package com.xxx.meter.ui.main.view;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.TimePickerDialog;

import java.util.Calendar;
import java.util.Locale;

public class TimePicketView {

    public static TimePickerDialog showDataPicket(Activity activity, TimePickerDialog.OnTimeSetListener onDateSetListener) {
        TimePickerDialog datePickerView = null;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            datePickerView = new TimePickerDialog(activity, AlertDialog.THEME_HOLO_LIGHT, onDateSetListener,
                    Calendar.getInstance(Locale.CHINA).get(Calendar.HOUR_OF_DAY),
                    Calendar.getInstance(Locale.CHINA).get(Calendar.HOUR_OF_DAY),
                    true);
        }
        return datePickerView;
    }

}
